#pragma once

#ifdef _WIN32
//define something for Windows (32-bit and 64-bit, this part is common)
#define TR_OS_WINDOWS
#define TR_OS "WINDOWS"
#ifdef _WIN64
//define something for Windows (64-bit only)
#else
//define something for Windows (32-bit only)
#endif
#elif __APPLE__
#define TR_OS_APPLE
#include "TargetConditionals.h"
#if TARGET_IPHONE_SIMULATOR
// iOS Simulator
#define TR_OS_IOS_SIMULATOR
#define TR_OS "IOS_SIMULATOR"
#elif TARGET_OS_IPHONE
// iOS device
#define TR_OS_IOS_PHONE
#define TR_OS "IOS_PHONE"
#elif TARGET_OS_MAC
// Other kinds of Mac OS
#define TR_OS_MAC
#define TR_OS "MAC"
#else
#   error "Unknown Apple platform"
#endif
#elif __ANDROID__
// android
#define TR_OS_ANDROID
#define TR_OS_LINUX
#define TR_OS "ANDROID"
#elif __linux__
// linux
#define TR_OS_LINUX
#define TR_OS "LINUX"
#elif __unix__ // all unices not caught above
// Unix
#define TR_OS_UNIX
#define TR_OS "UNIX"
#elif defined(_POSIX_VERSION)
// POSIX
#define TR_OS_POSIX "POSIX"
#define TR_OS "POSIX"
#else
#   error "Unknown compiler"
#endif